package psn.kiko.controller.mail;

import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import psn.kiko.pojo.Result;
import psn.kiko.pojo.dto.TextMailDTO;
import psn.kiko.service.business.message.EmailService;

import java.util.UUID;

/**
 *邮件发送控制器
 */
@RestController
@RequestMapping("/admin/mail")
@Api(tags = {"邮件管理"})
public class CodeValidationByMailController{
	@Autowired
	EmailService emailService;
	
	@PostMapping("send")
	public Result sendMail(@RequestBody TextMailDTO textMailDTO){
		emailService.sendTextEmail(textMailDTO);
		return Result.success();
	}
}
